openapi: 3.0.1
info:
  title: True Markets CeFi REST
  description: >
    ## Overview

    This API allows clients to interact with the **CeFi trading platform** for
    order management, market data retrieval, and account information.


    ## Base URL

    ```

    https://prod.truex.co/api/v1/

    ```


    ## Authentication

    Certain API requests must be **authenticated** using **HMAC-SHA256 signature
    authentication**.


    ## API Versioning

    The API uses date-based versioning via the `X-Truex-Version` header. To
    request a specific API version, include the header in your request:

    ```

    X-Truex-Version: v2024_01_01

    ```


    **Supported Versions:**

    | Version | Status | Description |

    |---------|--------|-------------|

    | `v2024_01_01` | Current (Default) | Original API format - responses return
    raw data arrays/objects |

    | `v2026_01_23` | Current | New envelope format - responses wrapped in `{
    "data": [...], "pagination": {...} }` |


    If no version header is provided, the API defaults to `v2024_01_01`. Use the
    `/api/v1/versions` endpoint to discover supported versions programmatically.


    **Response Format by Version:**

    - **v2024_01_01**: `[{...}, {...}]` (raw array) or `{...}` (raw object)

    - **v2026_01_23**: `{ "data": [...], "pagination": { "size": 10,
    "next_cursor": "..." } }`


    **Error Response Format by Version:**

    - **v2024_01_01**: RFC 7807 Problem Details format

    - **v2026_01_23**: `{ "error": { ...RFC 7807 Problem Details... } }`


    **Deprecation Policy:**

    When a version is deprecated, responses will include RFC 8594 headers:

    - `Deprecation`: Date when the version was deprecated

    - `Sunset`: Date when the version will be removed


    ## Links

    - 📖 **Full API Documentation**:
    [https://docs.truex.co/](https://docs.truex.co/)

    - 📧 **Support**: [support@truex.co](mailto:support@truex.co)
  contact:
    email: info@truex.co
  termsOfService: https://truex.co/tos
  version: v1.0.4
tags:
  - name: Service
    description: >-
      Health checks and API version discovery endpoints. These endpoints are
      publicly accessible and do not require authentication.
  - name: Assets
    description: Query available assets on the exchange by ID or name.
  - name: Instruments
    description: Query tradeable instruments (market definitions) and their statistics.
  - name: Market Data
    description: >-
      Real-time market quotes and VWAP computations. These endpoints are
      publicly accessible and do not require authentication.
  - name: Clients
    description: Retrieve and update client account information and settings.
  - name: Orders
    description: >-
      Create, modify, cancel, and query orders including status, trades, and
      activity history.
  - name: Balances
    description: Query account balances across all assets.
  - name: Transfers
    description: Initiate and track fund transfers between accounts.
  - name: Change Log
    description: >

      | Version   | Date       |
      Notes                                                 |

      |-----------|------------|-------------------------------------------------------|

      | v1.0.4    | 2026-03-12 | Compute quote now works for both base and qoute
      bases.|

      | v1.0.3    | 2026-01-27 | Pluralize all endpoints.  Deprecate singular
      versions.|

      | v1.0.2    | 2026-01-24 | Add API versioning support and versions
      endpoint.     |

      | v1.0.1    | 2025-10-24 | Add gateway health
      endpoint.                          |

      | v1.0.0    | 2025-10-16 | Initial
      Release.                                      |
servers:
  - url: https://prod.truex.co
paths:
  /api/v1/health:
    get:
      tags:
        - Service
      summary: Get service health
      description: >
        Returns the current readiness status for the REST API Gateway. The
        response includes a human-readable status indicator, the service name,
        and the timestamp when the status was generated.
      operationId: getServiceHealth
      responses:
        '200':
          description: Service is ready to handle requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceHealth'
        '400':
          $ref: '#/components/responses/BadRequest'
        '503':
          description: Service is degraded or unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceHealth'
      security:
        - {}
  /api/v1/versions:
    get:
      tags:
        - Service
      summary: Get supported API versions
      description: >
        Returns a list of supported API versions with their deprecation status.
        Use this endpoint to discover available versions and plan migrations
        when versions are deprecated.
      operationId: getApiVersions
      responses:
        '200':
          description: List of supported API versions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiVersions'
        '400':
          $ref: '#/components/responses/BadRequest'
      security:
        - {}
  /api/v1/assets:
    get:
      tags:
        - Assets
      summary: Get assets
      description: >-
        Query for assets available on the exchange by specific asset ID or
        name.  If no query parameters are supplied than ALL available assets
        will be returned.
      operationId: getAssets
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Asset'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - name: id
          in: query
          description: ID of asset to query for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
        - name: name
          in: query
          description: >
            Filters assets by name. Returns assets where the name is an exact
            match or contains the provided substring. Matching is
            case-sensitive.
          required: false
          schema:
            type: string
            minLength: 1
      security:
        - {}
  /api/v1/asset:
    get:
      tags:
        - Assets
      summary: Get assets (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/assets instead.** Query for assets available
        on the exchange by specific asset ID or name.  If no query parameters
        are supplied than ALL available assets will be returned.
      operationId: getAsset
      deprecated: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Asset'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - name: id
          in: query
          description: ID of asset to query for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
        - name: name
          in: query
          description: >
            Filters assets by name. Returns assets where the name is an exact
            match or contains the provided substring. Matching is
            case-sensitive.
          required: false
          schema:
            type: string
            minLength: 1
      security:
        - {}
  /api/v1/instruments:
    get:
      tags:
        - Instruments
      summary: Get instruments
      description: >-
        Query for instruments available on the exchange by specific instrument
        ID or symbol.  If no query parameters are supplied than ALL available
        instruments will be returned.
      operationId: getInstruments
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Instrument'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - name: id
          in: query
          description: ID of instrument to query for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
        - name: symbol
          in: query
          description: >
            Filters instruments by symbol. Returns instruments where the symbol
            is an exact match or contains the provided substring. Matching is
            case-sensitive.
          required: false
          schema:
            type: string
            minLength: 1
      security:
        - {}
  /api/v1/instrument:
    get:
      tags:
        - Instruments
      summary: Get instruments (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/instruments instead.** Query for instruments
        available on the exchange by specific instrument ID or symbol.  If no
        query parameters are supplied than ALL available instruments will be
        returned.
      operationId: getInstrument
      deprecated: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Instrument'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - name: id
          in: query
          description: ID of instrument to query for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
        - name: symbol
          in: query
          description: >
            Filters instruments by symbol. Returns instruments where the symbol
            is an exact match or contains the provided substring. Matching is
            case-sensitive.
          required: false
          schema:
            type: string
            minLength: 1
      security:
        - {}
  /api/v1/market/quote:
    get:
      tags:
        - Market Data
      summary: Get markets
      description: >-
        Query for the exchange best bid/offer (EBBO) by instrument ID. If no
        query parameters are supplied then ALL available EBBOs will be returned.
      operationId: getMarketData
      parameters:
        - name: instrument_id
          in: query
          description: >-
            Instrument ID of the market to query for. Must be a valid non-zero
            numeric ID.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MarketData'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - {}
  /api/v1/markets/quote:
    post:
      tags:
        - Market Data
      summary: Compute market quote
      description: >
        Calculate a quote preview for an asset using current visible order book
        depth. Supports both base quantity and quote (notional) quantity via the
        required qty_unit parameter.

        In schema `v2024_01_01`, successful responses contain only `qty` and
        `price`.

        For `qty_unit=QUOTE`, the exchange computes the largest executable base
        quantity that fits within the requested quote amount while respecting
        the instrument's base increment at the final consumed price level. As a
        result, in schema `v2026_01_23` the returned `notional` may be slightly
        less than the requested quote amount and the difference is reported in
        `notional_residual`.
      operationId: postMarketsQuote
      requestBody:
        description: Quote request parameters. qty_unit is required and has no default.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarketsQuoteRequest'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketsQuoteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - {}
  /api/v1/clients:
    get:
      tags:
        - Clients
      summary: Get clients
      description: Query for a user's information.
      operationId: getClients
      parameters:
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: id
          in: query
          description: ID of client to query for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
        - name: mnemonic
          in: query
          description: >
            Filters clients by mnemonic (human readable text). Returns clients
            where the mnemonic is an exact match or contains the provided
            substring. Matching is case-sensitive.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Client'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
    patch:
      tags:
        - Clients
      summary: Update settings
      description: Update client level settings.
      operationId: patchClients
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
      requestBody:
        description: Client settings context.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientPatch'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Client'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/client:
    get:
      tags:
        - Clients
      summary: Get clients (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/clients instead.** Query for a user's
        information.
      operationId: getClient
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: id
          in: query
          description: ID of client to query for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
        - name: mnemonic
          in: query
          description: >
            Filters clients by mnemonic (human readable text). Returns clients
            where the mnemonic is an exact match or contains the provided
            substring. Matching is case-sensitive.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Client'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
    patch:
      tags:
        - Clients
      summary: Update settings (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/clients instead.** Update client level
        settings.
      operationId: patchClient
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
      requestBody:
        description: Client settings context.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientPatch'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Client'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/orders:
    get:
      tags:
        - Orders
      summary: Get orders
      description: >-
        Fetches all orders for a client entered within the past 24 hours on the
        exchange. A filter can be provided to limit the results.
      operationId: getOrdersPlural
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: size
          in: query
          description: Number of records to return per page. Maximum allowed value is 100.
          required: false
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          description: >-
            Number of records to skip before returning results. Used for
            offset-based pagination.
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 2147483647
        - name: timestamp
          in: query
          description: >
            A Unix UTC timestamp in nanoseconds used as a reference point for
            fetching orders. The query will retrieve results created **before**
            this timestamp, enabling precise time-based filtering and ensuring
            stable pagination. If omitted, the server responds with **400 BAD
            REQUEST**.
          required: true
          schema:
            type: string
            example: '1741523275598727336'
            pattern: ^[0-9]{19}$
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderTrade'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
    post:
      tags:
        - Orders
      summary: Create order
      description: Create a new order for a specific instrument.
      operationId: addOrders
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
      requestBody:
        description: Order new request context.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderNew'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderActive'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
    patch:
      tags:
        - Orders
      summary: Modify order
      description: Modify an existing active order request.
      operationId: modifyOrders
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
      requestBody:
        description: Order modify request context.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderModify'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderActive'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/orders/{ref_id}:
    delete:
      tags:
        - Orders
      summary: Cancel order
      description: >
        Begins the cancellation process of an existing active order from the
        exchange. N.B. it is still possible to receive trades on the order that
        is being canceled.
      operationId: cancelOrders
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderActive'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: ref_id
          in: path
          description: >-
            ID of order to cancel. For id_type=exchange (default): positive
            integer. For id_type=client: 1-18 char ASCII string or 36-char UUID.
          required: true
          schema:
            type: string
            minLength: 1
            pattern: ^(?!^0$)[a-zA-Z0-9-]+$
        - name: id_type
          in: query
          description: >-
            Type of ID the ref_id is, must be either 'client' or 'exchange'. If
            omitted will default to 'exchange'
          required: false
          schema:
            type: string
            enum:
              - client
              - exchange
      security:
        - HMAC: []
  /api/v1/orders/list:
    get:
      tags:
        - Orders
      summary: All orders
      description: >-
        Query for all orders placed on the exchange within the last 24 hours. A
        filter can be provided to limit the results.
      operationId: getOrdersListPlural
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: query
          in: query
          description: >-
            A serialized JSON object containing filter parameters. Must be a
            valid JSON object with at least one key-value pair.
          required: true
          schema:
            type: string
            minLength: 15
            pattern: ^\{"columns":[ ]*\[[a-zA-Z0-9 {}\[\]:,"$_.\-]*\][ ]*\}$
        - name: skip
          in: query
          required: false
          description: The number of items to skip for pagination.
          schema:
            type: integer
            default: 0
            minimum: 0
            maximum: 2147483647
        - name: size
          in: query
          required: false
          description: The number of items to return.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/orders/active:
    get:
      tags:
        - Orders
      summary: Active orders
      description: Query for orders currently active on the exchange.
      operationId: getOrdersActive
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderActive'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: id
          in: query
          description: ID of order to query for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
      security:
        - HMAC: []
  /api/v1/orders/trade:
    get:
      tags:
        - Orders
      summary: All order trades
      description: >-
        Fetches all trades for a client executed within the past 24 hours on the
        exchange.
      operationId: getOrdersTradesPlural
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: size
          in: query
          description: Number of records to return per page. Maximum allowed value is 100.
          required: false
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          description: Number of records to skip before returning results.
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 2147483647
        - name: timestamp
          in: query
          description: >
            A Unix UTC timestamp in nanoseconds used as a reference point for
            fetching trades.
          required: true
          schema:
            type: string
            example: '1741523275598727336'
            pattern: ^[0-9]{19}$
        - name: client_id
          in: query
          description: >-
            Comma-separated list of client IDs to filter results. Only returns
            trades for the specified clients.
          required: false
          schema:
            type: string
            example: '78901968715907076'
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderActivityReportTrade'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/orders/activity:
    get:
      tags:
        - Orders
      summary: All order activity
      description: >-
        Fetches all activity (trades, confirms, rejects, cancels, modifications)
        for a client's orders.
      operationId: getOrdersActivityPlural
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: size
          in: query
          description: Number of records to return per page. Maximum allowed value is 100.
          required: false
          schema:
            type: string
            default: 10
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          description: Number of records to skip before returning results.
          required: false
          schema:
            type: string
        - name: timestamp
          in: query
          description: >
            A Unix UTC timestamp in nanoseconds used as a reference point for
            fetching activity.
          required: true
          schema:
            type: string
            example: '1741523275598727336'
            pattern: ^[0-9]{19}$
        - name: client_id
          in: query
          description: Comma-separated list of client IDs to filter results.
          required: false
          schema:
            type: string
            example: '78901968715907076'
        - name: order_id
          in: query
          description: Comma-separated list of order IDs to filter results.
          required: false
          schema:
            type: string
            example: '8005237327190949926'
        - name: msg_type
          in: query
          description: >-
            Comma-separated list of activity message types to filter results
            (e.g., REPORT_TRADE,REPORT_CONFIRM).
          required: false
          schema:
            type: string
            example: REPORT_TRADE
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderActivity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/orders/status/{ref_id}:
    get:
      tags:
        - Orders
      summary: Status order
      description: |
        Fetches the current status of a specific order identified by `ref_id`.
      operationId: getOrdersStatus
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: ref_id
          in: path
          description: >-
            ID of order to status. For id_type=exchange (default): positive
            integer. For id_type=client: 1-18 char ASCII string or 36-char UUID.
          required: true
          schema:
            type: string
            minLength: 1
            pattern: ^(?!^0$)[a-zA-Z0-9-]+$
          example: '123456789'
        - name: id_type
          in: query
          description: >-
            Type of ID the ref_id is, must be either 'client' or 'exchange'. If
            omitted will default to 'exchange'
          required: false
          schema:
            type: string
            enum:
              - client
              - exchange
      security:
        - HMAC: []
  /api/v1/order/status/{ref_id}:
    get:
      tags:
        - Orders
      summary: Status order (deprecated)
      description: >
        **DEPRECATED: Use /api/v1/orders/status/{ref_id} instead.** Fetches the
        current status of a specific order identified by `ref_id`. The service
        retains status data for a limited period (**currently 28 days**), but
        this retention window is subject to change via configuration or system
        resource availability. `ref_id` must be one of the following:
          * The exchange assigned order ID.

          * **UUID** version 4 in its human readable form, with hypens, and in lowercase.

          * **ASCII** [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) compliant character string that does not exceed 18 characters.
            * Acceptable characters are `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`, `~`
      operationId: getOrderStatus
      deprecated: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: ref_id
          in: path
          description: >-
            ID of order to status. For id_type=exchange (default): positive
            integer. For id_type=client: 1-18 char ASCII string or 36-char UUID.
          required: true
          schema:
            type: string
            minLength: 1
            pattern: ^(?!^0$)[a-zA-Z0-9-]+$
          example: '123456789'
        - name: id_type
          in: query
          description: >-
            Type of ID the ref_id is, must be either 'client' or 'exchange'. If
            omitted will default to 'exchange'
          required: false
          schema:
            type: string
            enum:
              - client
              - exchange
      security:
        - HMAC: []
  /api/v1/order/list:
    get:
      tags:
        - Orders
      summary: All orders (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/orders/list instead.** Query for all orders
        placed on the exchange within the last 24 hours. A filter can be
        provided to limit the results.
      operationId: getOrdersList
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: query
          in: query
          description: >-
            A serialized JSON object containing filter parameters. Filter orders
            by property, using $eq, $lt, $gt, $gte, $lte, $in operators. Must be
            a valid JSON object with at least one key-value pair.
          required: true
          schema:
            type: string
            minLength: 15
            pattern: ^\{"columns":[ ]*\[[a-zA-Z0-9 {}\[\]:,"$_.\-]*\][ ]*\}$
          examples:
            example1:
              summary: Filter for rejected or canceled  orders
              value: >-
                {"columns":[{"name":"status","filter":[{"$in": ["REJECTED",
                "CANCELED"]}] }]}
        - name: skip
          in: query
          required: false
          description: The number of items to skip for pagination.
          schema:
            type: integer
            default: 0
            minimum: 0
            maximum: 2147483647
          examples:
            example1:
              summary: Skip 10 items
              value: 10
        - name: size
          in: query
          required: false
          description: The number of items to return.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
          examples:
            example1:
              summary: Return 10 items
              value: 10
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/order/active:
    get:
      tags:
        - Orders
      summary: Active orders (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/orders/active instead.** Query for orders
        currently active on the exchange. An order ID may be supplied to query
        for a specific order, if this query parameter is not supplied then all
        active orders will be returned.
      operationId: getOrderActive
      deprecated: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderActive'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: id
          in: query
          description: ID of order to query for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
      security:
        - HMAC: []
  /api/v1/order/trade:
    get:
      tags:
        - Orders
      summary: All order trades (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/orders/trade instead.** Fetches all trades for
        a client executed within the past 24 hours on the exchange. A filter can
        be provided to limit the results.
      operationId: getOrderTrades
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: size
          in: query
          description: Number of records to return per page. Maximum allowed value is 100.
          required: false
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          description: >-
            Number of records to skip before returning results. Used for
            offset-based pagination.
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 2147483647
        - name: timestamp
          in: query
          description: >
            A Unix UTC timestamp in nanoseconds used as a reference point for
            fetching trades. The query will retrieve results created **before**
            this timestamp, enabling precise time-based filtering and ensuring
            stable pagination. If omitted, the server responds with **400 BAD
            REQUEST**.
          required: true
          schema:
            type: string
            example: '1741523275598727336'
            pattern: ^[0-9]{19}$
        - name: client_id
          in: query
          description: >-
            Comma-separated list of client IDs to filter results. Only returns
            trades for the specified clients.
          required: false
          schema:
            type: string
            example: '78901968715907076'
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderActivityReportTrade'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/order/activity:
    get:
      tags:
        - Orders
      summary: All order activity (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/orders/activity instead.** Fetches all
        activity for a client's orders.
      operationId: getOrderActivity
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: size
          in: query
          description: Number of records to return per page. Maximum allowed value is 100.
          required: false
          schema:
            type: string
            default: 10
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          description: Number of records to skip before returning results.
          required: false
          schema:
            type: string
        - name: timestamp
          in: query
          description: >
            A Unix UTC timestamp in nanoseconds used as a reference point for
            fetching activity.
          required: true
          schema:
            type: string
            example: '1741523275598727336'
            pattern: ^[0-9]{19}$
        - name: client_id
          in: query
          description: Comma-separated list of client IDs to filter results.
          required: false
          schema:
            type: string
            example: '78901968715907076'
        - name: order_id
          in: query
          description: Comma-separated list of order IDs to filter results.
          required: false
          schema:
            type: string
            example: '8005237327190949926'
        - name: msg_type
          in: query
          description: Comma-separated list of activity message types to filter results.
          required: false
          schema:
            type: string
            example: REPORT_TRADE
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderActivity'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/order:
    get:
      tags:
        - Orders
      summary: Get orders (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/orders instead.** Fetches all orders for a
        client entered within the past 24 hours on the exchange. A filter can be
        provided to limit the results.
      operationId: getOrders
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: size
          in: query
          description: Number of records to return per page. Maximum allowed value is 100.
          required: false
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          description: >-
            Number of records to skip before returning results. Used for
            offset-based pagination.
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 2147483647
        - name: timestamp
          in: query
          description: >
            A Unix UTC timestamp in nanoseconds used as a reference point for
            fetching orders. The query will retrieve results created **before**
            this timestamp, enabling precise time-based filtering and ensuring
            stable pagination. If omitted, the server responds with **400 BAD
            REQUEST**.
          required: true
          schema:
            type: string
            example: '1741523275598727336'
            pattern: ^[0-9]{19}$
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/OrderTrade'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
    post:
      tags:
        - Orders
      summary: Create order (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/orders instead.** Create a new order for a
        specific instrument.
      operationId: addOrder
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
      requestBody:
        description: Order new request context.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderNew'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderActive'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
    patch:
      tags:
        - Orders
      summary: Modify order (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/orders instead.** Modify an existing active
        order request.
      operationId: modifyOrder
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
      requestBody:
        description: Order modify request context.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderModify'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderActive'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/order/{ref_id}:
    delete:
      tags:
        - Orders
      summary: Cancel order (deprecated)
      description: >
        **DEPRECATED: Use /api/v1/orders/{ref_id} instead.** Begins the
        cancellation process of an existing active order from the exchange. 
        N.B. it is still possible to receive trades on the order that is being
        canceled. `ref_id` must be one of the following:
         * The exchange assigned order ID.

         * **UUID** version 4 in its human readable form, with hypens, and in lowercase.

         * **ASCII** [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) compliant character string that does not exceed 18 characters.
           * Acceptable characters are `a-z`, `A-Z`, `0-9`, `-`, `_`, `.`, `~`
      operationId: cancelOrder
      deprecated: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderActive'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: ref_id
          in: path
          description: >-
            ID of order to cancel. For id_type=exchange (default): positive
            integer. For id_type=client: 1-18 char ASCII string or 36-char UUID.
          required: true
          schema:
            type: string
            minLength: 1
            pattern: ^(?!^0$)[a-zA-Z0-9-]+$
        - name: id_type
          in: query
          description: >-
            Type of ID the ref_id is, must be either 'client' or 'exchange'.  If
            omitted will default to 'exchange'
          required: false
          schema:
            type: string
            enum:
              - client
              - exchange
      security:
        - HMAC: []
  /api/v1/balances:
    get:
      tags:
        - Balances
      summary: Get balance
      description: Query for balance information current allocated to the exchange.
      operationId: getBalances
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: asset_id
          in: query
          description: ID of asset to query balance information for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
        - name: asset_name
          in: query
          description: >-
            Name of asset to query balance information for. ASCII alphanumeric
            only.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[a-zA-Z0-9_-]+$
        - name: client_id
          in: query
          description: Exchange generated client ID to query balance information for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Balances'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/balance:
    get:
      tags:
        - Balances
      summary: Get balance (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/balances instead.** Query for balance
        information current allocated to the exchange.
      operationId: getBalance
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: asset_id
          in: query
          description: ID of asset to query balance information for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
        - name: asset_name
          in: query
          description: >-
            Name of asset to query balance information for. ASCII alphanumeric
            only.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[a-zA-Z0-9_-]+$
        - name: client_id
          in: query
          description: Exchange generated client ID to query balance information for.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Balances'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/transfers:
    get:
      tags:
        - Transfers
      summary: Get transfer
      description: >-
        Fetches all transfers for a client within the past 24 hours on the
        exchange.
      operationId: getTransfersPlural
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: size
          in: query
          description: >-
            Number of transfers to return per page. Maximum allowed value is
            100.
          required: false
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          description: >-
            Number of records to skip before returning results. Used for
            offset-based pagination.
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 2147483647
        - name: timestamp
          in: query
          description: >
            A Unix UTC timestamp in nanoseconds used as a reference point for
            fetching transfers.
          required: true
          schema:
            type: string
            example: '1741523275598727336'
            pattern: ^[0-9]{19}$
      responses:
        '200':
          description: Successful response with a list of transfers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HistoricalTransfer'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
    post:
      tags:
        - Transfers
      summary: Initiate transfer
      description: Initiate a new transfer of assets to/from the exchange.
      operationId: addTransfersPlural
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
      requestBody:
        description: Transfer request object.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Transfer'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferDetails'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/transfers/active:
    get:
      tags:
        - Transfers
      summary: Get Active transfers
      description: Fetches all currently active transfers on the exchange.
      operationId: getActiveTransfersPlural
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: transfer_id
          in: query
          description: >-
            Unique identifier of a specific transfer. If omitted, all active
            transfers for the client will be returned.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
      responses:
        '200':
          description: Successful response with active transfers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TransferDetails'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/transfer/active:
    get:
      tags:
        - Transfers
      summary: Get Active transfers (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/transfers/active instead.** Fetches all
        currently active transfers on the exchange. If a `transfer_id` is
        provided, returns details for the specified transfer. Otherwise,
        retrieves all active transfers for the authenticated client.
      operationId: getActiveTransfer
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: transfer_id
          in: query
          description: >-
            Unique identifier of a specific transfer. If omitted, all active
            transfers for the client will be returned.
          required: false
          schema:
            type: string
            minLength: 1
            pattern: ^[1-9][0-9]*$
      responses:
        '200':
          description: Successful response with active transfers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TransferDetails'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
  /api/v1/transfer:
    get:
      tags:
        - Transfers
      summary: Get transfer (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/transfers instead.** Fetches all transfers for
        a client within the past 24 hours on the exchange.
      operationId: getTransfer
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
        - name: size
          in: query
          description: >-
            Number of transfers to return per page. Maximum allowed value is
            100.
          required: false
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: skip
          in: query
          description: >-
            Number of records to skip before returning results. Used for
            offset-based pagination.
          required: false
          schema:
            type: integer
            minimum: 0
            maximum: 2147483647
        - name: timestamp
          in: query
          description: >
            A Unix UTC timestamp in nanoseconds used as a reference point for
            fetching transfers. The query will retrieve results created
            **before** this timestamp, enabling precise time-based filtering and
            ensuring stable pagination. If omitted, the server responds with
            **400 BAD REQUEST**.
          required: true
          schema:
            type: string
            example: '1741523275598727336'
            pattern: ^[0-9]{19}$
      responses:
        '200':
          description: Successful response with a list of transfers.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HistoricalTransfer'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
    post:
      tags:
        - Transfers
      summary: Initiate transfer (deprecated)
      description: >-
        **DEPRECATED: Use /api/v1/transfers instead.** Initiate a new transfer
        of assets to/from the exchange.
      operationId: addTransfer
      deprecated: true
      parameters:
        - $ref: '#/components/parameters/XAuthUserId'
        - $ref: '#/components/parameters/XAuthTimestamp'
        - $ref: '#/components/parameters/XAuthToken'
        - $ref: '#/components/parameters/XAuthSignature'
      requestBody:
        description: Transfer request object.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Transfer'
        required: true
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransferDetails'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '408':
          $ref: '#/components/responses/Timeout'
        '415':
          $ref: '#/components/responses/UnsupportedMedia'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HMAC: []
components:
  schemas:
    ServiceHealth:
      type: object
      description: Status information for the REST API Gateway.
      required:
        - status
        - timestamp
        - service
      properties:
        status:
          type: string
          description: Overall readiness indicator for the API.
          enum:
            - healthy
            - degraded
          example: healthy
        timestamp:
          type: string
          description: >-
            UTC timestamp the status was generated formatted as `YYYY-MM-DD
            HH:MM:SS`.
          example: '2025-01-15 14:30:00'
        service:
          type: string
          description: Name of the service reporting health.
          example: rag
    ApiVersions:
      type: object
      description: Information about supported API versions.
      required:
        - supported_versions
        - default_version
        - version_header
      properties:
        supported_versions:
          type: array
          description: List of all supported API versions.
          items:
            $ref: '#/components/schemas/ApiVersionInfo'
        default_version:
          type: string
          description: The version used when no X-Truex-Version header is provided.
          example: v2024_01_01
        version_header:
          type: string
          description: The header name to use for specifying API version.
          example: X-Truex-Version
    ApiVersionInfo:
      type: object
      description: Information about a specific API version.
      required:
        - version
        - deprecated
      properties:
        version:
          type: string
          description: The version identifier to use in the X-Truex-Version header.
          example: v2024_01_01
        deprecated:
          type: boolean
          description: Whether this version is deprecated and scheduled for removal.
          example: false
        deprecation_date:
          type: string
          description: >
            HTTP-date format timestamp of when the version was deprecated. Only
            present if deprecated is true.
          example: Sat, 01 Feb 2025 00:00:00 GMT
        sunset_date:
          type: string
          description: >
            HTTP-date format timestamp of when the version will be removed. Only
            present if deprecated is true.
          example: Sun, 01 Feb 2026 00:00:00 GMT
    Asset:
      type: object
      properties:
        id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901949717282824'
          description: Exchange assigned ID of asset.
        status:
          enum:
            - DISABLED
            - ACTIVE
            - INVALID
          type: string
          example: ACTIVE
          description: Current asset state.
        fields:
          type: object
          properties:
            name:
              type: string
              maxLength: 31
              example: BTC
              description: Human readable name of the asset.
            min_transfer_qty:
              type: string
              example: '1000.01'
              description: >-
                The minimum amount of an asset that can be transferred in a
                single transaction, specific to each asset.
            max_transfer_qty:
              type: string
              example: '9999.99'
              description: >-
                The maximum amount of an asset that can be transferred in a
                single transaction, specific to each asset.
            flags:
              type: array
              uniqueItems: true
              items:
                type: string
                enum:
                  - REFERENCE_ASSET
                  - STABLECOIN
                example: STABLECOIN
              description: >
                A platform-defined value that provides additional metadata or
                classification for the asset. This flag is used to denote
                specific attributes or roles associated with the asset within
                the exchange ecosystem.

                - **REFERENCE_ASSET** Indicates that the asset is the default
                reference asset for the exchange. It serves as the primary asset
                for settling trades by default and is used as the basis for
                calculating fees.

                - **STABLECOIN** Indicates if the asset is a stablecoin (value
                pegged to a external source such as fiat currency.
    InstrumentStat:
      type: object
      properties:
        last_24hr_notional:
          type: string
          example: '4325606.30380'
          description: >-
            The notional (quantity * price) amount of REFERENCE_ASSET traded
            over the last 24hr period.
        last_24hr_quantity:
          type: string
          example: '123754.234598480'
          description: The quantity traded over the last 24 hour period.
    Instrument:
      type: object
      properties:
        id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901949723181070'
          description: Exchange assigned ID of the instrument.
        status:
          enum:
            - INVALID
            - DISABLED
            - OPENING
            - ACTIVE
            - HALTED
          type: string
          example: ACTIVE
          description: >-
            Current instrument state. INVALID indicates the requested instrument
            ID does not exist.
        info:
          type: object
          properties:
            symbol:
              type: string
              maxLength: 31
              example: BTC-PYUSD
              description: Human readable representation of the instrument.
            reference_price:
              type: string
              example: '75000.50'
              description: Price used for initial price limit/band calcuations.
            base_asset_id:
              type: string
              pattern: ^[1-9][0-9]*$
              example: '78901949718265865'
              description: ID of the base asset.
            quote_asset_id:
              type: string
              pattern: ^[1-9][0-9]*$
              example: '78901949717282824'
              description: ID of the quote asset.
            price_limit_window_secs:
              type: string
              example: '3600'
              description: Number of seconds in the price limit's sliding window.
            price_limit_percent:
              type: string
              example: '0.015'
              description: >-
                Specifies the percentage threshold for price movement beyond a
                reference price (e.g., the midpoint or previous close) at which
                the exchange will take action. If the price of a trade or order
                breaches this threshold, the exchange may halt trading, trigger
                a circuit breaker, or initiate other predefined actions to
                ensure market stability.
            price_bands_percent:
              type: string
              example: '0.025'
              description: >-
                Defines the acceptable price range for order validation within
                the market. The price bands ensure that orders are priced within
                a range around the market's midpoint, adjusted for increments
                and thresholds.
        stats:
          type: object
          $ref: '#/components/schemas/InstrumentStat'
    MarketQuote:
      type: object
      properties:
        price:
          type: string
          example: '110865.50'
          description: Price at this level.
        qty:
          type: string
          example: '0.00018'
          description: Aggregate quantity resting at this level.
        order_count:
          type: string
          example: '10'
          description: Number of orders resting at this level.
    MarketTrade:
      type: object
      properties:
        price:
          type: string
          example: '110868'
          description: Price of the last trade.
        qty:
          type: string
          example: '0.00901'
          description: Quantity of the last trade.
        timestamp:
          type: string
          example: '1752156263825281640'
          description: The Unix UTC timestamp (in nanoseconds) when the trade was executed.
    MarketsQuoteRequest:
      type: object
      required:
        - qty
        - instrument_id
        - side
        - qty_unit
      properties:
        qty:
          type: string
          minLength: 1
          pattern: ^[0-9]+(\.[0-9]+)?$
          example: '1.5'
          description: >-
            The quantity to quote. Interpretation depends on qty_unit: for BASE
            this is the base asset amount, for QUOTE this is the notional (e.g.
            USD) amount.
        instrument_id:
          type: string
          minLength: 1
          pattern: ^[1-9][0-9]*$
          example: '1'
          description: >-
            The instrument ID for which to calculate the quote. Must be a valid
            non-zero numeric ID.
        side:
          type: string
          enum:
            - BUY
            - SELL
          example: BUY
          description: >-
            The side of the quote request. BUY calculates the price to buy the
            base asset, SELL calculates the price to sell.
        qty_unit:
          type: string
          enum:
            - BASE
            - QUOTE
          example: BASE
          description: >-
            Unit of the qty field. BASE means qty is in base asset units, QUOTE
            means qty is in quote asset (notional) units. Required — no default.
      additionalProperties: false
    MarketsQuoteResponse:
      type: object
      properties:
        qty:
          type: string
          example: '1.5'
          description: >-
            The base quantity. For qty_unit=QUOTE, this is the computed base
            amount. For qty_unit=BASE, this echoes back the requested base
            quantity.
        price:
          type: string
          example: '50025.50'
          description: >-
            The calculated VWAP (Volume-Weighted Average Price) across consumed
            order book levels.
        notional:
          type: string
          example: '75038.25'
          description: >-
            Schema `v2026_01_23` only. The expected quote amount consumed from
            visible order book liquidity.
        notional_residual:
          type: string
          example: '0.10'
          description: >-
            Schema `v2026_01_23` only. The unfilled portion of the requested
            quote amount. This is typically zero, but for qty_unit=QUOTE it can
            be positive when the remaining amount is smaller than one base
            increment at the final consumed price level.
    MarketData:
      type: object
      properties:
        id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901949723181070'
          description: Exchange assigned ID of the market data.
        symbol:
          type: string
          maxLength: 31
          example: BTC-PYUSD
          description: Human readable representation of the instrument.
        info:
          type: object
          properties:
            last_trade:
              type: object
              $ref: '#/components/schemas/MarketTrade'
              description: Last trade information.
            best_bid:
              type: object
              $ref: '#/components/schemas/MarketQuote'
              description: Current (at the time of request) exchange best bid.
            best_ask:
              type: object
              $ref: '#/components/schemas/MarketQuote'
              description: Current (at the time of request) exchange best ask.
            last_update:
              type: string
              example: '1752156513225654386'
              description: >-
                A UTC Unix epoch in nanoseconds indicating when the book was
                last updated.
    Client:
      type: object
      properties:
        id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901949710204932'
        status:
          enum:
            - INITIIALIZED
            - ACTIVE
            - DISABLED
          type: string
          example: ACTIVE
          description: Current client state.
        info:
          type: object
          properties:
            organization_id:
              type: string
              format: uuid
              description: >-
                Must be UUIDv4. [RFC
                9562](https://datatracker.ietf.org/doc/html/rfc9562#name-uuid-version-4).
              example: ed671d2b-bb9e-4cf5-9eb4-71b6db672207
            mnemonic:
              type: string
              example: CLIENT1
              description: Client supplied human readable name of the client entity.
            type:
              type: string
              enum:
                - INSTITUTION
                - INDIVIDUAL
                - APPLICATION
              example: INDIVIDUAL
              description: Client designation.
            maker_fee_tier:
              type: integer
              example: 1
              description: Client's current maker fee tier.
            taker_fee_tier:
              type: integer
              example: 2
              description: Client's current taker fee tier.
            self_trade_prevention:
              type: string
              enum:
                - INVALID
                - NONE
                - CANCEL_AGGRESSIVE
                - CANCEL_BOTH
              example: CANCEL_AGGRESSIVE
              description: >
                Client level self trade protection instruction.

                * **INVALID** Client level self trade protections are in an
                invalid state and may result in order rejection.

                * **NONE** No self trade protections are enabled for this
                client.  Can be overridden at the order level.

                * **CANCEL_AGGRESSIVE** All orders entered with this client ID
                will have cancel aggressive self trade protections enabled.

                * **CANCEL_BOTH** All order entered with this client ID will
                have cancel both self trade protections enabled.
    ClientPatch:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901949710270469'
        info:
          type: object
          properties:
            self_trade_prevention:
              type: string
              enum:
                - NONE
                - CANCEL_AGGRESSIVE
                - CANCEL_BOTH
              example: CANCEL_BOTH
              description: >
                Set the client level self trade protection instruction.

                * **NONE** No self trade protections are enabled for this
                client.

                * **CANCEL_AGGRESSIVE** All orders entered with this client ID
                will have cancel aggressive self trade protections enabled.

                * **CANCEL_BOTH** All order entered with this client ID will
                have cancel both self trade protections enabled.
    OrderNew:
      type: object
      required:
        - info
      properties:
        external_id:
          type: string
          example: 321e7654-e89b-42d4-a456-426614174000
          description: >
            A unique identifier created by the client.  Must be in one of the
            following formats:

            * **UUID** version 4 in its human readable form, with hypens, and in
            lowercase.

            * **ASCII** character string of up to 18 characters containing only
            the unreserved URL characters: letters (a–z, A–Z), digits (0–9),
            hyphen (-), underscore (\_), period (.), and tilde (~). 
        info:
          type: object
          $ref: '#/components/schemas/OrderInfo'
    OrderInfo:
      type: object
      required:
        - client_id
        - instrument_id
        - qty
        - price
        - side
        - type
      properties:
        msg_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '799477895858487977'
          description: ID of last message to act upon the order.
        parent_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '432351810263056385'
          description: ID of the application creating the order, may be zero.
        client_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901949710204932'
          description: The client ID the order will be entered on behalf of.
        instrument_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901949723181070'
          description: The ID of the instrument the order will transact in.
        qty:
          type: string
          example: '0.00145'
          description: The amount of base asset the order is requesting to tranasct.
        price:
          type: string
          example: '111067'
          description: >-
            The highest or lowest price the order will buy or sell,
            respectively, at. Only required for LIMIT orders.
        flags:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
              - USE_AGGRESSIVE_PRICING
            example: USE_AGGRESSIVE_PRICING
          description: >
            General order flags that can be combined and used together.

            * **USE_AGGRESIVE_PRICING** Applicable to market orders only. When
            enabled, the exchange calculates a price for the market order that
            is more aggressive than the current best bid or offer. This is
            useful when prioritizing liquidity capture over minimizing price
            slippage.
        side:
          type: string
          enum:
            - BUY
            - SELL
          description: |
            Side of order, can be `BUY` or `SELL`
            * **BUY** Provide trader's quote asset to acquire the base asset.
            * **SELL** Provide trader's base asset to acquire the quote asset.
          example: BUY
        type:
          type: string
          enum:
            - LIMIT
            - MARKET
          description: >
            Type of order, can be `LIMIT`, `MARKET`.

            * **LIMIT** A specified limit price sets the maximum amount in quote
            currency units that the order will exchange to acquire the base
            currency.

            * **MARKET** The order uses the CeFi exchange market price at time
            of order entry plus/minus (for buy/sell respectively) the max price
            allowed by the price band risk limits for the instrument.
          example: LIMIT
        tif:
          type: string
          enum:
            - GTC
            - IOC
          description: >
            The "Time In Force" (TIF) of an order indicates how long the order
            will remain active before being canceled, can be `GTC`, `IOC`.

            * **GTC** (Good-Till-Cancel) Order remains active for up to 30 days
            from the time of entry. 

            * **IOC** (Immediate-Or-Cancel) Order will execute as much of the
            order as possible up to the requested price, provided there are
            existing orders that match or improve upon the price. An `IOC` order
            will cancel any unfilled quantity back to the requestor. If no
            matching orders are found, the `IOC` order will be canceled
            immediately. If the TIF is omitted, the order will default to `GTC`.
          example: GTC
        exec_inst_flags:
          type: array
          uniqueItems: true
          items:
            type: string
            enum:
              - ALO
              - AON
            example: ALO
          description: >
            Execution specific instructions that can be combined and used
            together.

            * **ALO** Ensures the order adds liquidity to the market rather than
            removing it. When this flag is enabled, the order will only be
            placed if it would not immediately execute against the current best
            bid or offer. If the order would otherwise result in an immediate
            match, it will be canceled or adjusted based on the exchange's
            rules. * **AON** Requests that the order either fully executes or
            cancel back to user with nothing done. All or none (AON) is only
            valid on market orders.
        hold_fee_rate:
          type: string
          example: '0.002'
          description: >-
            The amount of fee asset being held by the order. This is not
            necessarily the fee charge associated with the order.
        stp:
          type: string
          enum:
            - INVALID
            - NONE
            - CANCEL_AGGRESSIVE
            - CANCEL_BOTH
          example: NONE
          description: >
            Order level self trade protection instruction.

            * **INVALID** Order level self trade protections are in an invalid
            state and may result in order rejection.

            * **NONE** No self trade protections are enabled for this order.  

            * **CANCEL_AGGRESSIVE** This order will be canceled in the result of
            a self trade.

            * **CANCEL_BOTH** This order and the resting order will both be
            canceled in the result of a self trade.
    OrderModify:
      type: object
      required:
        - info
      properties:
        id:
          type: string
          example: '1159718398822187014'
          description: >
            The internal order ID of the order to be modified. This is the id
            that was set by the exchange and should be a purely numeric string.
        external_id:
          type: string
          example: 123e7654-e89b-42d4-a456-426614174000
          description: >
            The external ID for the order to be modified set by the client. Must
            be in one of the following formats:

            * **UUID** version 4 in its human readable form, with hypens, and in
            lowercase.

            * **ASCII** character string of up to 18 characters containing only
            the unreserved URL characters: letters (a–z, A–Z), digits (0–9),
            hyphen (-), underscore (\_), period (.), and tilde (~). 
        info:
          type: object
          $ref: '#/components/schemas/ModifyInfo'
    ModifyInfo:
      type: object
      required:
        - client_id
        - new_qty
        - new_price
      properties:
        msg_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '1'
          description: ID of last message to act upon the order.
        parent_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '1'
          description: ID of the application creating the order, may be zero.
        client_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '1'
          description: The client ID the modification will be entered on behalf of.
        prev_modify:
          type: string
          example: '0'
          description: ID of previous modify to act upon the order.
        new_qty:
          type: string
          example: '0'
          description: The new amount of base asset the order is requesting to tranasct.
        new_price:
          type: string
          example: '0'
          description: >-
            The new highest or lowest price the order will buy or sell,
            respectively, at. Only required for LIMIT orders.
        new_type:
          type: string
          enum:
            - MARKET
          example: MARKET
          description: >
            `LIMIT` orders may be converted to `MARKET` orders. The new `MARKET`
            order will immediately execute against the resting side of the order
            book providing there is available liquidity on the contra side of
            the request.
    OrderActive:
      type: object
      properties:
        id:
          type: string
          example: '799477895858487977'
        status:
          enum:
            - INITIALIZED
            - NEW_PENDING
            - REJECTED
            - ACTIVE
            - FILLED
            - CANCEL_PENDING
            - CANCELED
            - MODIFY_PENDING
          type: string
          example: ACTIVE
          description: >
            The current status of the order.

            * **INITIALIZED** Order has been created, but not sent yet.

            * **NEW_PENDING** Order has been sent, but not confirmed by the
            exchange or downstream process.

            * **REJECTED** An order setting or market condition prevents the
            order from getting processed.

            * **ACTIVE** The order was accepted by the system and open to
            trading (order and market conditions permitting).

            * **FILLED** The entire order traded.

            * **CANCEL_PENDING** Indicates a cancel request was received and
            being processed.

            * **CANCELED** The order was canceled from a cancel request, order
            conditions, or market conditions.

            * **MODIFY_PENDING** Indicates a modification request was received
            and being processed.
        order_info:
          type: object
          $ref: '#/components/schemas/OrderInfo'
        modify_info:
          type: object
          $ref: '#/components/schemas/ModifyInfo'
        external_id:
          type: string
          example: EXT-ORDER-123
          description: >
            A unique identifier created by the client.  Must be in one of the
            following formats:

            * **UUID** version 4 in its human readable form, with hypens, and in
            lowercase.

            * **ASCII** character string of up to 18 characters containing only
            the unreserved URL characters: letters (a–z, A–Z), digits (0–9),
            hyphen (-), underscore (\_), period (.), and tilde (~). 
        ref_external_id:
          type: string
          example: REF-EXT-ORDER-123
          description: >
            A unique identifier created by the client.  Must be in one of the
            following formats:

            * **UUID** version 4 in its human readable form, with hypens, and in
            lowercase.

            * **ASCII** character string of up to 18 characters containing only
            the unreserved URL characters: letters (a–z, A–Z), digits (0–9),
            hyphen (-), underscore (\_), period (.), and tilde (~). 
        pending_qty:
          type: string
          example: '0'
          description: >-
            Order quantity that has been acknowledge by the exchange but is not
            yet trading.
        leaves_qty:
          type: string
          example: '0.00145'
          description: Order quantity that is currently active in the market.
        exeuted_qty:
          type: string
          example: '0.00239'
          description: Amount of quantity currently executed.
        executed_vwap:
          type: string
          example: '111050.5'
          description: >-
            Volume weighted average price calculation for all executions on the
            order.
    Order:
      allOf:
        - $ref: '#/components/schemas/OrderActive'
        - type: object
          properties:
            total:
              type: string
              example: '3500000'
              description: Total notional (quantity X price) of the order.
            timestamp:
              type: string
              example: '1752159930164131767'
              description: UNIX UTC nanosecond timestamp of when the order was created.
            update_timestamp:
              type: string
              example: '1752159930192000004'
              description: >-
                UNIX UTC nanosecond timestamp of when the order was last
                updated.
    Balance:
      type: object
      properties:
        asset_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901985048264711'
          description: >-
            Exchange assigned entity ID. For balance entities this will be the
            same as your client id.
        balance:
          type: string
          example: '10000000.45'
          description: Total amount of asset currently placed on the exchange.
        unsettled:
          type: string
          example: '0'
          description: >-
            Amount of asset that has been traded on the exchange but is awaiting
            settlement by the asset custodian.
        order_hold:
          type: string
          example: '3586008.49833'
          description: >-
            Amount of asset currently being held by the exchange due to trading
            activity.
        transfer_hold:
          type: string
          example: '100.00'
          description: >-
            Amount of asset currently being held by the exchange due to transfer
            activity.
        state:
          type: string
          enum:
            - INVALID
            - INITIALIZED
            - OPEN
            - LOCKED
            - CLOSING
          example: OPEN
          description: >
            Current state of the balance.

            * **INVALID** Balance is not active on the exchange and currently in
            an error state.

            * **INIITIALIZED** Balance has been created on the exchange but is
            not currently active.

            * **OPEN** Balance is active on the exchange.

            * **LOCKED** Balance is on the exchange but cannot be used for
            transactions.

            * **CLOSING** Balance is currently be moved off of the exchange and
            cannot be used for transactions."
    Balances:
      type: object
      properties:
        id:
          type: string
          example: '78901985055342602'
          description: Exchange assigned entity ID.
        status:
          type: string
          enum:
            - INVALID
          example: INVALID
          description: Exchange only status value, will always be INVALID.
        unsettled_fees:
          type: string
          example: '9210.236229375'
          description: >-
            Current amount of fee asset that have been accrued due to trading
            but have yet to be settled with the exchange.
        fees_hold:
          type: string
          example: '179300.4249165'
          description: >-
            Current amount of fee asset that is being held by the exchange as a
            result of trading activity.
        balances:
          type: array
          items:
            $ref: '#/components/schemas/Balance'
    FiatInstructions:
      type: object
      required:
        - fiat_account_id
        - identity_id
        - account_id
        - includes_fee
      properties:
        fiat_account_id:
          type: string
          format: uuid
          description: The ID of the fiat account to use for the transfer.
          example: ed671d2b-bb9e-4cf5-9eb4-71b6db672207
        identity_id:
          type: string
          format: uuid
          description: The identity ID of the individual submitting the transfer.
          example: b2a99c93-f1ee-41ed-9e9e-ec704cfbca4b
        account_id:
          type: string
          format: uuid
          description: The account ID of the institution submitting the transfer.
          example: b2a99c93-f1ee-41ed-9e9e-ec704cfbca4b
        includes_fee:
          type: boolean
          description: >-
            Indicates whether the transfer amount includes or doesn't include
            the fee.
    CryptoInstructions:
      type: object
      required:
        - address
        - identity_id
        - account_id
        - includes_fee
        - network
      properties:
        address:
          type: string
          description: A wallet address (including prefix) to use for the crypto transfer.
          example: '0x4b6f5a3dfc911e992c3d8f38c6bb9d1563b5e9a5'
        fee_id:
          type: string
          format: uuid
          description: The ID of a pre-arranged fee guarantee to use with the transfer.
          example: ed671d2b-bb9e-4cf5-9eb4-71b6db672207
        identity_id:
          type: string
          format: uuid
          description: The identity ID of the institution submitting the transfer.
          example: b2a99c93-f1ee-41ed-9e9e-ec704cfbca4b
        account_id:
          type: string
          format: uuid
          description: The account ID of the institution submitting the transfer.
          example: ed671d2b-bb9e-4cf5-9eb4-71b6db672207
        includes_fee:
          type: boolean
          description: >-
            Indicates whether the transfer amount includes or doesn't include
            the fee.
        network:
          type: string
          enum:
            - BITCOIN
            - ETHEREUM
            - SOLANA
          description: The crypto network to perform the transfer on.
          example: SOLANA
    TransferNew:
      type: object
      required:
        - asset_id
        - client_id
        - amount
        - type
        - platform
      properties:
        amount:
          type: string
          example: '1000000'
          description: Amount of asset to transfer.
        asset_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901985055342602'
          description: Exchange assigned ID of asset.
        client_id:
          type: string
          pattern: ^[1-9][0-9]*$
          example: '78901985048264710'
          description: Exchange assigned ID of client.
        type:
          type: string
          enum:
            - DEPOSIT
            - WITHDRAW
          example: WITHDRAW
          description: |
            Direction of the transfer.
            * **DEPOSIT** Place the amount specified on the exchange.
            * **WITHDRAW** Remove the amount specified from the exchange.
        platform:
          type: string
          enum:
            - FIAT
            - CRYPTO
          example: FIAT
          description: >
            The type of service to use for the transfer. Must match with the
            corresponding instructions defined below.

            * **FIAT** Indicates the transfer should use the traditional banking
            system used to handle the corresponding fiat currency. Note,
            performing a transfer with fiat on a stablecoin asset will result in
            an automatic conversion.

            * **CRYPTO** Indicates the transfer uses a blockchain platform.
        instructions:
          oneOf:
            - $ref: '#/components/schemas/FiatInstructions'
            - $ref: '#/components/schemas/CryptoInstructions'
          description: >
            Platform specific instructions. The defined object must match with
            the platform value.

            * **FiatInstructions** Must be used when setting the platform to
            `FIAT`

            * **CryptoInstructions** Must be used when setting the platform to
            `CRYPTO`
    Transfer:
      type: object
      required:
        - request
      properties:
        request:
          type: object
          $ref: '#/components/schemas/TransferNew'
    TransferDetails:
      type: object
      properties:
        id:
          type: string
          example: '799477925457100828'
        status:
          type: string
          enum:
            - INITIALIZED
            - PENDING
            - COMPLETED
            - FAILED
            - REJECTED
          example: INITIALIZED
        request:
          $ref: '#/components/schemas/TransferNew'
    HistoricalTransfer:
      type: object
      properties:
        id:
          type: string
          example: '799477925458083869'
        status:
          type: string
          enum:
            - INITIALIZED
            - PENDING
            - COMPLETED
            - FAILED
            - REJECTED
          example: INITIALIZED
        request:
          $ref: '#/components/schemas/TransferNew'
        timestamp:
          type: string
          format: int64
          description: >-
            The UNIX UTC nanosecond timestamp of when the transfer was
            initiated.
          example: '1740740509058376312'
        updated_timestamp:
          type: string
          format: int64
          description: >-
            The UNIX UTC nanosecond timestamp of the last update to the
            transfer.
          example: '1740740509058376312'
    OrderTrade:
      type: object
      properties:
        client_id:
          type: string
          pattern: ^[1-9][0-9]*$
          description: A unique identifier assigned to the client.
          example: '78901968715907076'
        instrument_id:
          type: string
          pattern: ^[1-9][0-9]*$
          description: A unique identifier for the trading instrument.
          example: '78901968728948750'
        order_id:
          type: string
          pattern: ^[1-9][0-9]*$
          description: A unique identifier for the order.
          example: '8005237327190949926'
        trade_price:
          type: string
          description: The price at which the trade was executed.
          example: '111480.5'
        trade_qty:
          type: string
          description: The quantity of the asset traded.
          example: '0.06089'
        trade_fee_rate:
          type: string
          description: The fee rate applied to the trade.
          example: '0.0005'
        liq_flag:
          type: string
          description: Indicates whether the trade was executed as a taker or a maker.
          enum:
            - TAKER
            - MAKER
          example: TAKER
        match_id:
          type: string
          pattern: ^[1-9][0-9]*$
          description: A unique identifier for the trade match event.
          example: '147670564223998146302870408890920992792'
        timestamp:
          type: string
          description: The Unix UTC timestamp (in nanoseconds) when the trade was executed.
          example: '1752163579133484200'
    OrderActivityBase:
      type: object
      description: Common fields present in all order activity events.
      required:
        - client_id
        - instrument_id
        - msg_type
        - timestamp
        - side
      properties:
        client_id:
          type: string
          description: A unique identifier assigned to the client.
          example: '78975249877368840'
        external_id:
          type: string
          description: An external identifier for the order.
          example: 550e8400-e29b-41d4-a716-446655440000
        instrument_id:
          type: string
          description: A unique identifier for the trading instrument.
          example: '78975249883267118'
        msg_type:
          type: string
          description: The type of activity event.
          enum:
            - REQUEST_NEW
            - REQUEST_CANCEL
            - REQUEST_MODIFY
            - REPORT_CONFIRM
            - REPORT_REJECT
            - REPORT_TRADE
            - REPORT_CANCELED
            - REPORT_MODIFIED
        timestamp:
          type: string
          description: The Unix UTC timestamp (in nanoseconds) when the activity occurred.
          example: '1770919994854735762'
        side:
          type: string
          description: The side of the order (BUY/SELL).
          enum:
            - BUY
            - SELL
          example: BUY
    OrderActivityRequestNew:
      description: Activity event for a new order request.
      allOf:
        - $ref: '#/components/schemas/OrderActivityBase'
        - type: object
          properties:
            msg_type:
              type: string
              enum:
                - REQUEST_NEW
            order_price:
              type: string
              description: The requested order price.
              example: '66000'
            order_qty:
              type: string
              description: The requested order quantity.
              example: '0.0001'
    OrderActivityRequestCancel:
      description: Activity event for a cancel order request.
      allOf:
        - $ref: '#/components/schemas/OrderActivityBase'
        - type: object
          properties:
            msg_type:
              type: string
              enum:
                - REQUEST_CANCEL
    OrderActivityRequestModify:
      description: Activity event for a modify order request.
      allOf:
        - $ref: '#/components/schemas/OrderActivityBase'
        - type: object
          properties:
            msg_type:
              type: string
              enum:
                - REQUEST_MODIFY
    OrderActivityReportConfirm:
      description: Activity event for an order confirmation.
      allOf:
        - $ref: '#/components/schemas/OrderActivityBase'
        - type: object
          required:
            - order_id
          properties:
            msg_type:
              type: string
              enum:
                - REPORT_CONFIRM
            order_id:
              type: string
              description: A unique identifier for the order.
              example: '2312760665443598349'
    OrderActivityReportReject:
      description: Activity event for an order rejection.
      allOf:
        - $ref: '#/components/schemas/OrderActivityBase'
        - type: object
          required:
            - order_id
          properties:
            msg_type:
              type: string
              enum:
                - REPORT_REJECT
            order_id:
              type: string
              description: A unique identifier for the order.
              example: '2312760665443598349'
            reject_reason:
              type: string
              description: The reason for order rejection.
              example: INSUFFICIENT_FUNDS
            reject_message:
              type: string
              description: Human-readable rejection message.
              example: Insufficient funds to place order
    OrderActivityReportTrade:
      description: Activity event for a trade execution.
      allOf:
        - $ref: '#/components/schemas/OrderActivityBase'
        - type: object
          required:
            - order_id
          properties:
            msg_type:
              type: string
              enum:
                - REPORT_TRADE
            order_id:
              type: string
              description: A unique identifier for the order.
              example: '2312760665443598349'
            trade_price:
              type: string
              description: The price at which the trade was executed.
              example: '111480.5'
            trade_qty:
              type: string
              description: The quantity of the asset traded.
              example: '0.06089'
            trade_fee_rate:
              type: string
              description: The fee rate applied to the trade.
              example: '0.0005'
            liq_flag:
              type: string
              description: >-
                Liquidity flag indicating whether the order was a maker or
                taker.
              enum:
                - TAKER
                - MAKER
              example: TAKER
            match_id:
              type: string
              description: A unique identifier for the trade match.
              example: '147670564223998146302870408890920992792'
    OrderActivityReportCanceled:
      description: Activity event for an order cancellation.
      allOf:
        - $ref: '#/components/schemas/OrderActivityBase'
        - type: object
          required:
            - order_id
          properties:
            msg_type:
              type: string
              enum:
                - REPORT_CANCELED
            order_id:
              type: string
              description: A unique identifier for the order.
              example: '2312760665443598349'
            canceled_qty:
              type: string
              description: The quantity that was canceled.
              example: '1.5'
            cancel_reason:
              type: string
              description: The reason for cancellation.
              example: USER_REQUESTED
    OrderActivityReportModified:
      description: Activity event for an order modification.
      allOf:
        - $ref: '#/components/schemas/OrderActivityBase'
        - type: object
          required:
            - order_id
          properties:
            msg_type:
              type: string
              enum:
                - REPORT_MODIFIED
            order_id:
              type: string
              description: A unique identifier for the order.
              example: '2312760665443598349'
            old_qty:
              type: string
              description: The original order quantity before modification.
              example: '0.0001'
            old_price:
              type: string
              description: The original order price before modification.
              example: '66000'
            new_qty:
              type: string
              description: The new order quantity after modification.
              example: '0.0001'
            new_price:
              type: string
              description: The new order price after modification.
              example: '66001'
            old_type:
              type: string
              description: The original order type before modification.
              example: LIMIT
            new_type:
              type: string
              description: The new order type after modification.
              example: LIMIT
    OrderActivity:
      oneOf:
        - $ref: '#/components/schemas/OrderActivityRequestNew'
        - $ref: '#/components/schemas/OrderActivityRequestCancel'
        - $ref: '#/components/schemas/OrderActivityRequestModify'
        - $ref: '#/components/schemas/OrderActivityReportConfirm'
        - $ref: '#/components/schemas/OrderActivityReportReject'
        - $ref: '#/components/schemas/OrderActivityReportTrade'
        - $ref: '#/components/schemas/OrderActivityReportCanceled'
        - $ref: '#/components/schemas/OrderActivityReportModified'
      discriminator:
        propertyName: msg_type
        mapping:
          REQUEST_NEW: '#/components/schemas/OrderActivityRequestNew'
          REQUEST_CANCEL: '#/components/schemas/OrderActivityRequestCancel'
          REQUEST_MODIFY: '#/components/schemas/OrderActivityRequestModify'
          REPORT_CONFIRM: '#/components/schemas/OrderActivityReportConfirm'
          REPORT_REJECT: '#/components/schemas/OrderActivityReportReject'
          REPORT_TRADE: '#/components/schemas/OrderActivityReportTrade'
          REPORT_CANCELED: '#/components/schemas/OrderActivityReportCanceled'
          REPORT_MODIFIED: '#/components/schemas/OrderActivityReportModified'
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
          description: A URI reference that identifies the problem type.
          example: about:blank
        title:
          type: string
          description: A short, human-readable summary of the problem type.
          example: An Error Occured
        status:
          type: integer
          format: int32
          description: The HTTP status code generated by the origin server.
          example: 400
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          example: A more detailed sentence about the error
        instance:
          type: string
          format: uri-reference
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          example: /api/v1/endpoint
        extensions:
          type: object
          additionalProperties: true
          description: A map for extension members (custom fields not defined by the RFC).
  securitySchemes:
    HMAC:
      type: apiKey
      in: header
      name: x-truex-auth-token
      description: >
        Clients must compute and send an HMAC signature in
        `x-truex-auth-signature`.


        Compute the payload exactly as:


        `timestamp + method + path + body`


        Then compute the signature as:


        `Base64( HMAC_SHA256(secret, payload) )`


        Rules:

        * `timestamp` is `x-truex-auth-timestamp` in **seconds since Unix
        epoch**.

        * `timestamp` must be no older than 15 seconds and no more than 1 second
        in the future.

        * `method` is uppercase HTTP method (`GET`, `POST`, `DELETE`, etc.).

        * `path` is everything after the domain, including leading `/` (e.g.
        `/api/v1/order`) and excludes query string parameters.

        * `body` is the exact raw request body string. Use an empty string for
        requests with no body.


        Example payload:

        *
        `1700000000POST/api/v1/order{"client_id":"7","instrument_id":"1","qty":"1","price":"100"}`


        Example signature (shell):

        * `printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET" -binary
        | base64`


        Note, method is all upper case and path is everything after the domain
        name including the / (e.g. /api/v1/order).

        Required headers:

        * `x-truex-auth-token`: The ID of the HMAC key being used (API key).

        * `x-truex-auth-signature`: The signature generated from processing the
        payload with the HMAC key.

        * `x-truex-auth-timestamp`: Current time as seconds since epoch.

        * `x-truex-auth-userid`: Client identifier.
  parameters:
    XTruexVersion:
      in: header
      name: X-Truex-Version
      required: false
      schema:
        type: string
        enum:
          - v2024_01_01
          - v2026_01_23
        default: v2024_01_01
      description: >
        API version to use for the request. Controls response format: -
        `v2024_01_01` (default): Raw data arrays/objects - `v2026_01_23`:
        Envelope format with `{ "data": [...], "pagination": {...} }`
    XAuthUserId:
      in: header
      name: x-truex-auth-userid
      required: true
      schema:
        type: string
      description: Client identifier.
    XAuthTimestamp:
      in: header
      name: x-truex-auth-timestamp
      required: true
      schema:
        type: string
      description: >-
        Timestamp when request was made in seconds since epoch. Must be no older
        than 15 seconds and no more than 1 second in the future.
    XAuthToken:
      in: header
      name: x-truex-auth-token
      required: true
      schema:
        type: string
      description: The UUID affiliated with the HMAC key.
    XAuthSignature:
      in: header
      name: x-truex-auth-signature
      required: true
      schema:
        type: string
      description: The computed HMAC signature.
  responses:
    BadRequest:
      description: Bad request.
      content:
        application/problem+json:
          schema:
            type: object
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: Unauthorized.
      content:
        application/problem+json:
          schema:
            type: object
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: Forbidden.
      content:
        application/problem+json:
          schema:
            type: object
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: Not found.
      content:
        application/problem+json:
          schema:
            type: object
            $ref: '#/components/schemas/Problem'
    Timeout:
      description: Request timeout.
      content:
        application/problem+json:
          schema:
            type: object
            $ref: '#/components/schemas/Problem'
    UnsupportedMedia:
      description: Unsupported media type.
      content:
        application/problem+json:
          schema:
            type: object
            $ref: '#/components/schemas/Problem'
    InternalError:
      description: Internal server error.
      content:
        application/problem+json:
          schema:
            type: object
            $ref: '#/components/schemas/Problem'
    ServiceUnavailable:
      description: Service unavailable.
      content:
        application/problem+json:
          schema:
            type: object
            $ref: '#/components/schemas/Problem'
